/*
 * @Author: 朝言夕识 11442050+we-know-each-other-every-day@user.noreply.gitee.com
 * @Date: 2024-07-26 16:50:15
 * @LastEditors: 朝言夕识 11442050+we-know-each-other-every-day@user.noreply.gitee.com
 * @LastEditTime: 2024-07-26 16:56:03
 * @FilePath: \10\yinyue-app\public\js\rem.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

function remSize() {
    var width = document.documentElement.clientWidth || window.innerWidth
    if (width >= 750) {
        width = 750
    }
    if (width <= 320) {
        width = 320
    }
    document.documentElement.style.fontSize = width / 7.5 + 'px'
    document.querySelector('body').style.fontSize = 0.3 + 'rem'
}
remSize()
// 窗口发生变化调用界面适配
window.onresize = function () {
    remSize()
}